package com.heima.behavior.service.impl;

import com.heima.behavior.service.ApUnlikesBehaviorService;
import com.heima.behavior.thread.AppThreadLocalUtil;
import com.heima.behavior.util.ParamJudge;
import com.heima.model.behavior.dtos.UnLikesBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import com.heima.model.user.pojos.ApUser;
import org.springframework.stereotype.Service;

@Service
public class ApUnlikesBehaviorServiceImpl implements ApUnlikesBehaviorService {
	@Override
	public ResponseResult unlikeBehavior(UnLikesBehaviorDto dto) {
		ApUser apUser = ParamJudge.DtoAndUser(dto);
		
		if (apUser == null) {
			return ResponseResult.errorResult(AppHttpCodeEnum.PARAM_REQUIRE);
		}
		//用户登录状态判断
		if (apUser == null) {
			return ResponseResult.errorResult(AppHttpCodeEnum.NEED_LOGIN);
		}
		return null;
	}
}
